home *** CD-ROM | disk | FTP | other *** search
-
- #include <Types.h>
- #include <QuickDraw.h>
- #include <Lists.h>
- #include <Sysequ.h>
- #include <ToolUtils.h>
- #include <Files.h>
- #include <Packages.h>
-
- #include <myUtils.h>
-
- #include "list.h"
-
- pascal void ENTRY( short lMessage, Boolean lSelect, Rect *lRect, Cell /*lCell*/,
- short lDataOffset, short lDataLen, ListHandle lHandle)
- {
- short left;
- short top;
- FontInfo fontInfo;
- Handle cellData;
- ListData* strings;
- Str255 port;
-
- cellData = (**lHandle).cells;
- HLock(cellData);
-
- switch (lMessage) {
- case lInitMsg:
- break;
- case lDrawMsg:
- EraseRect(lRect);
-
- strings = (ListData*) (*cellData + lDataOffset);
-
- if (lDataLen > 0) {
- GetFontInfo(&fontInfo);
-
- top = lRect->top + (**lHandle).indent.v + 0;
- left = lRect->left + (**lHandle).indent.h + 5;
- MoveTo(left, top + fontInfo.ascent);
- DrawString(strings->resName);
-
- NumToString((long) strings->resID, port);
- PStrCat(port, ((strings->resType == 'TCP ') ? "\p/TCP" : "\p/UDP"));
-
- left += ((lRect->right - lRect->left) * 2 / 3);
- MoveTo(left, top + fontInfo.ascent);
- DrawString(port);
- }
-
- if (lSelect) {
- BitClr((Ptr) HiliteMode, pHiliteBit);
- InvertRect(lRect);
- }
- break;
- case lHiliteMsg:
- BitClr((Ptr) HiliteMode, pHiliteBit);
- InvertRect(lRect);
- break;
- case lCloseMsg:
- break;
- }
-
- HUnlock(cellData);
- }